#include "e2d/imgui/impl/Editor.h"
#include "e2d/core/impl/components.h"
#include "e2d/ui/State.h"
#include "sysx/System.h"

using Editor = e2d::BasicEditor;

template<>
bool Editor::Edit<e2d::Prefeb>(const std::string& l, e2d::Prefeb& e)
{
    auto& sg = e2d::State::Inst();

    int index = 0;

    e2d::CustomEditor::ComboEditEntity("m_SourceEntity", e.m_SourceEntity, e.m_Entity->m_Scene->m_AllEntitiesCalculatedNoPrefeb);

    if (ImGui::Button("Load Source"))
    {
        e.OnLoad();
    }

    ImGui::SameLine();
    if (ImGui::Button("Update Source"))
    {
        e.UpdateSource();
        sg.m_LoadPrefebs = true;
    }



    return false;
};

